package com.mz.ozy.activity.me;

import android.os.Bundle;

import com.flyco.tablayout.SlidingTabLayout;
import com.mz.ozy.R;
import com.mz.ozy.adapter.MyKeepFragmentAdapter;
import com.mz.ozy.base.BaseActivity;

import androidx.annotation.Nullable;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author lifeStyle on 2020/4/3 0003.
 */
public class MyKeepActivity extends BaseActivity {


    @BindView(R.id.tl_tab_layout)
    SlidingTabLayout tlTabLayout;
    @BindView(R.id.vp_view_pager)
    ViewPager vpViewPager;
    private String[] titles = {"商品", "文章"};

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_keep);
        ButterKnife.bind(this);
        initTitle();
        tvCenterTitle.setText("我的收藏");
        //添加Fragment
        vpViewPager.setAdapter(new MyKeepFragmentAdapter(getSupportFragmentManager()));
        tlTabLayout.setViewPager(vpViewPager, titles);
    }
}
